﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true"
    CodeFile="EditPastPublications.aspx.cs" Inherits="Admin_EditPastPublications" %>

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="fck"%>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table class="innerContent" width="100%" cellpadding="0" cellspacing="0">
        <tr>
            <td>
                <img src="Images/img-table-1.gif" />
            </td>
            <td width="100%" class="table-bg-1">
            </td>
            <td>
                <img src="Images/img-table-2.gif" />
            </td>
        </tr>
        <tr>
            <td class="table-bg-2">
                &nbsp;
            </td>
            <td>
                <div class="heading">
                    <img src="Images/img-heading-box.gif" align="absmiddle" />
                    &nbsp; Manage Past Publications</div>
                <br />
                <div class="strip">
                </div>
                <table cellpadding="5" width="100%">
                    <tr>
                    <td>
                        <table width="100%" border="0" runat="server" id="trUploadPDF" visible="false">
                        <tr>
                            <td>
                            <asp:Label runat="server" ID="lblError" CssClass="failureNotification">
                            </asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <fck:fckeditor runat="server" id="FckEditor1" height="500" width="710" basepath="~/fckeditor/"></fck:fckeditor>
                        </td>
                    </tr>
                    <tr>
                        <td align="left">
                            Upload pdf file: &nbsp;
                            <asp:FileUpload ID="fileuploadPdf" runat="server" />
                            &nbsp;&nbsp;
                        <asp:HyperLink ID="hlnkDownload" Target="_blank" CssClass="downloadpublication" runat="server" Text="Click here to view selected publication" Visible="false" />
                            <asp:HiddenField ID="hidId" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td align="center">
                            <asp:Button runat="server" ID="Button1" Text="Update" OnClick="btnUpdate_Click" />
                        </td>
                    </tr>

                    </table>
                        
                    </td>
                     </tr>



                    <tr>
                        <td>
                            <asp:GridView ID="grvPublications" HorizontalAlign="Center" Width="100%" CellPadding="5" runat="server"
                                AutoGenerateColumns="False" EmptyDataText="Record(s) not found!!!" AllowPaging="true" PageSize="10" CssClass="grdv-style"
                                DataKeyNames="PublicationsId" OnPageIndexChanging="grvPublications_PageIndexChanging"
                                OnRowCommand="grvPublications_RowCommand" OnRowUpdating="grvPublications_RowUpdating"
                                OnRowDeleting="grvPublications_RowDeleting" 
                                onrowdatabound="grvPublications_RowDataBound">
                                <Columns>
                                    <asp:TemplateField HeaderText="Title" ItemStyle-Width="25%" ItemStyle-VerticalAlign="Top">
                                        <ItemTemplate>
                                            <asp:HiddenField ID="hdnSelectedItem" runat="server" Value='<%#Eval("PublicationsId")%>' />
                                            <asp:Label ID="lblTitle" runat="server" Text='<%#Eval("Title")%>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Description" ItemStyle-Width="75%" ItemStyle-VerticalAlign="Top">
                                        <ItemTemplate>
                                            <asp:Label ID="lblDescription" runat="server" Text='<%#Eval("PageDescription")%>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="View"  ItemStyle-Width="50px" ItemStyle-VerticalAlign="Top">
                                        <ItemTemplate>
                                            <asp:HiddenField ID="hidFileName" Value='<%# Eval("PubFileName") %>' runat="server" />
                                            <asp:HyperLink ID="hlnkPubFileName" Target="_blank" runat="server" Visible="false">View</asp:HyperLink>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Action" HeaderStyle-Width="120px" ItemStyle-Width="120px" ItemStyle-VerticalAlign="Top">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lnkDelete" runat="server" Text="Delete" CommandName="Delete"
                                                OnClientClick="return confirm('Are you sure to delete this Record?');" CommandArgument='<%#Eval("PublicationsId")%>'></asp:LinkButton>
                                            <asp:LinkButton ID="lnkEdit" runat="server" Text="Edit" CommandName="Update" CommandArgument='<%#Eval("PublicationsId")%>'></asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <HeaderStyle CssClass="grdv-header-style" />
                                <RowStyle CssClass="grdv-row-style" />
                                <AlternatingRowStyle CssClass="grdv-altrow-style" />
                                <FooterStyle CssClass="grdv-footer-style" />
                                <PagerStyle CssClass="grdv-pager-style" />
                                <EmptyDataRowStyle CssClass="grdv-empty-style" />
                            </asp:GridView>
                        </td>
                    </tr>
                </table>
                '
                <br />
                <br />
                <div class="cl">
                </div>
            </td>
            <td class="table-bg-3">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td>
                <img src="Images/img-table-3.gif" />
            </td>
            <td class="table-bg-4">
            </td>
            <td>
                <img src="Images/img-table-4.gif" />
            </td>
        </tr>
    </table>
</asp:Content>
